home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / net / bind-contrib.tar.gz / bind-contrib.tar / contrib / host / defs.h < prev    next >
C/C++ Source or Header  |  1996-12-02  |  5KB  |  185 lines

  1. /*
  2. ** Declaration of functions.
  3. **
  4. **    @(#)defs.h              e07@nikhef.nl (Eric Wassenaar) 961113
  5. */
  6.  
  7. /*
  8. ** Internal modules of the host utility
  9. ** ------------------------------------
  10. */
  11.     /* main.c */
  12.  
  13. int main        PROTO((int, char **));
  14. void set_defaults    PROTO((char *, int, char **));
  15. int process_argv    PROTO((int, char **));
  16. int process_file    PROTO((FILE *));
  17. int process_name    PROTO((char *));
  18. int execute_name    PROTO((char *));
  19. bool execute        PROTO((char *, ipaddr_t));
  20. bool host_query        PROTO((char *, ipaddr_t));
  21. char *myhostname    PROTO((void));
  22. void set_server        PROTO((char *));
  23. void set_logfile    PROTO((char *));
  24. void fatal        PROTO((char *, ...));
  25. void errmsg        PROTO((char *, ...));
  26.  
  27.     /* info.c */
  28.  
  29. bool get_hostinfo    PROTO((char *, bool));
  30. bool get_domaininfo    PROTO((char *, char *));
  31. int get_info        PROTO((querybuf *, char *, int, int));
  32. bool print_info        PROTO((querybuf *, int, char *, int, int, bool));
  33. void print_data        PROTO((char *, ...));
  34. u_char *print_rrec    PROTO((char *, int, int, u_char *, u_char *, u_char *, bool));
  35. u_char *skip_qrec    PROTO((char *, int, int, u_char *, u_char *, u_char *));
  36. bool get_recursive    PROTO((char **));
  37.  
  38.     /* list.c */
  39.  
  40. bool list_zone        PROTO((char *));
  41. bool find_servers    PROTO((char *));
  42. bool get_servers    PROTO((char *));
  43. bool get_nsinfo        PROTO((querybuf *, int, char *));
  44. void sort_servers    PROTO((void));
  45. bool skip_transfer    PROTO((char *));
  46. void do_check        PROTO((char *));
  47. bool do_transfer    PROTO((char *));
  48. bool transfer_zone    PROTO((char *, struct in_addr, char *));
  49. bool get_zone        PROTO((char *, struct in_addr, char *));
  50. void update_zone    PROTO((char *));
  51. bool get_mxrec        PROTO((char *));
  52. char *get_primary    PROTO((char *));
  53. bool check_zone        PROTO((char *));
  54. bool get_soainfo    PROTO((querybuf *, int, char *));
  55. void check_soa        PROTO((querybuf *, char *));
  56. bool check_dupl        PROTO((ipaddr_t));
  57. bool check_ttl        PROTO((char *, int, int, int));
  58. void clear_ttltab    PROTO((void));
  59. int host_index        PROTO((char *, bool));
  60. void clear_hosttab    PROTO((void));
  61. int zone_index        PROTO((char *, bool));
  62. void clear_zonetab    PROTO((void));
  63. int check_canon        PROTO((char *));
  64.  
  65.     /* addr.c */
  66.  
  67. bool check_addr        PROTO((char *));
  68. bool check_name        PROTO((ipaddr_t));
  69.  
  70.     /* geth.c */
  71.  
  72. struct hostent *geth_byname    PROTO((CONST char *));
  73. struct hostent *geth_byaddr    PROTO((CONST char *, int, int));
  74.  
  75.     /* util.c */
  76.  
  77. int parse_type        PROTO((char *));
  78. int parse_class        PROTO((char *));
  79. char *in_addr_arpa    PROTO((char *));
  80. char *nsap_int        PROTO((char *));
  81. void print_host        PROTO((char *, struct hostent *));
  82. void show_res        PROTO((void));
  83. void print_statistics    PROTO((char *, int, int));
  84. void clear_statistics    PROTO((void));
  85. void show_types        PROTO((char *, int, int));
  86. void ns_error        PROTO((char *, int, int, char *));
  87. char *decode_error    PROTO((int));
  88. void print_status    PROTO((querybuf *, int));
  89. void pr_error        PROTO((char *, ...));
  90. void pr_warning        PROTO((char *, ...));
  91. bool want_type        PROTO((int, int));
  92. bool want_class        PROTO((int, int));
  93. bool indomain        PROTO((char *, char *, bool));
  94. bool samedomain        PROTO((char *, char *, bool));
  95. bool gluerecord        PROTO((char *, char *, char **, int));
  96. int matchlabels        PROTO((char *, char *));
  97. char *pr_domain        PROTO((char *, bool));
  98. char *pr_dotname    PROTO((char *));
  99. char *pr_nsap        PROTO((char *));
  100. char *pr_type        PROTO((int));
  101. char *pr_class        PROTO((int));
  102. int expand_name        PROTO((char *, int, u_char *, u_char *, u_char *, char *));
  103. int check_size        PROTO((char *, int, u_char *, u_char *, u_char *, int));
  104. bool valid_name        PROTO((char *, bool, bool, bool));
  105. int canonical        PROTO((char *));
  106. char *mapreverse    PROTO((char *, struct in_addr));
  107. int compare_name    PROTO((const ptr_t *, const ptr_t *));
  108.  
  109.     /* misc.c */
  110.  
  111. ptr_t *xalloc        PROTO((ptr_t *, siz_t));
  112. char *itoa        PROTO((int));
  113. char *utoa        PROTO((int));
  114. char *xtoa        PROTO((int));
  115. char *stoa        PROTO((u_char *, int, bool));
  116. char *base_ntoa        PROTO((u_char *, int));
  117. char *nsap_ntoa        PROTO((u_char *, int));
  118. char *ipng_ntoa        PROTO((u_char *));
  119. char *pr_date        PROTO((int));
  120. char *pr_time        PROTO((int, bool));
  121. char *pr_spherical    PROTO((int, char *, char *));
  122. char *pr_vertical    PROTO((int, char *, char *));
  123. char *pr_precision    PROTO((int));
  124.  
  125.     /* send.c */
  126.  
  127. #ifdef HOST_RES_SEND
  128. int res_send        PROTO((CONST qbuf_t *, int, qbuf_t *, int));
  129. #endif /*HOST_RES_SEND*/
  130. int _res_connect    PROTO((int, struct sockaddr_in *, int));
  131. int _res_write        PROTO((int, struct sockaddr_in *, char *, char *, int));
  132. int _res_read        PROTO((int, struct sockaddr_in *, char *, char *, int));
  133. void _res_perror    PROTO((struct sockaddr_in *, char *, char *));
  134.  
  135. /*
  136. ** External library functions
  137. ** --------------------------
  138. */
  139.     /* extern */
  140.  
  141. ipaddr_t inet_addr    PROTO((CONST char *));
  142. char *inet_ntoa        PROTO((struct in_addr));
  143. char *hostalias        PROTO((CONST char *));
  144.  
  145.     /* avoid <strings.h> */
  146.  
  147. #if !defined(index)
  148.  
  149. char *index        PROTO((const char *, int));
  150. char *rindex        PROTO((const char *, int));
  151.  
  152. #endif
  153.  
  154.     /* <string.h> */
  155.  
  156. #if !defined(NO_STRING_H)
  157. #include <string.h>
  158. #else
  159.  
  160. char *strcpy        PROTO((char *, const char *));
  161. char *strncpy        PROTO((char *, const char *, siz_t));
  162.  
  163. #endif
  164.  
  165.     /* <stdlib.h> */
  166.  
  167. #if defined(__STDC__) && !defined(apollo)
  168. #include <stdlib.h>
  169. #else
  170.  
  171. char *getenv        PROTO((const char *));
  172. ptr_t *malloc        PROTO((siz_t));
  173. ptr_t *realloc        PROTO((ptr_t *, siz_t));
  174. free_t free        PROTO((ptr_t *));
  175. void exit        PROTO((int));
  176. void qsort        PROTO((ptr_t *, siz_t, siz_t, int (*)(const ptr_t *, const ptr_t *)));
  177.  
  178. #endif
  179.  
  180.     /* <unistd.h> */
  181.  
  182. #if defined(__STDC__) && !defined(apollo)
  183. #include <unistd.h>
  184. #endif
  185.